import Vue from 'vue'
import App from './appssr.vue'
import { createRouter } from './js/app/router/indexSSR.js'
import ArteryUI from './components/index.js'
import markdown from './components/markdown.js'

// 导出一个工厂函数，用于创建新的应用程序，router 实例
Vue.use(ArteryUI, {})
Vue.use(markdown, {})
Artery.codeUrl = ' http://localhost:8080/artery/code/list/{codeType}'
export function createApp () {
  // 创建 router 实例
  const router = createRouter()

  const app = new Vue({
    // 根实例简单的渲染应用程序组件。
    router,
    render: h => h(App)
  })
  return { app, router }
}
